//
//  HQEmployeeManageCell.m
//  MobileiOS
//
//  Created by 郝庆松 on 2018/6/19.
//  Copyright © 2018年 PCITC. All rights reserved.
//

#import "HQEmployeeManageCell.h"

@implementation HQEmployeeManageCell

/**
 生成Cell
 
 @param tableView 列表
 @return ***
 */
+(instancetype)cellWithTableView:(UITableView*)tableView{
    static NSString *CellIdentifer = @"HQEmployeeManageCell";
    HQEmployeeManageCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifer];
    if(!cell){
        [tableView registerNib:[UINib nibWithNibName:CellIdentifer bundle:nil] forCellReuseIdentifier:CellIdentifer];
        cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifer];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}


/**
 数据源

 @param dataInfo 数据
 */
-(void)setDataInfo:(id)dataInfo{
    _dataInfo = dataInfo;
    _deleteItem.dataInfo = _dataInfo;
    self.itemTitle.text = _dataInfo[@"shop_name"];
    if([_dataInfo[@"status"] integerValue] == 2){
        self.itemTitleBg.backgroundColor = [UIColor redColor];
        self.itemTitle.textColor = [UIColor whiteColor];
    }else{
        self.itemTitleBg.backgroundColor = [UIColor whiteColor];
        self.itemTitle.textColor = [UIColor blackColor];
    }
   
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
